﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Exchange_edit.aspx.cs" Inherits="ihongma.Web.admin.Exchange.Exchange_edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>编辑礼物卡生成</title>
<script type="text/javascript" src="../../scripts/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../../scripts/jquery/Validform_v5.3.2_min.js"></script>
<script type="text/javascript" src="../../scripts/lhgdialog/lhgdialog.js?skin=idialog"></script>
<script type="text/javascript" src="../js/layout.js"></script>
   <script type="text/javascript" src="../../scripts/datepicker/WdatePicker.js"></script>

<link href="../skin/default/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
    $(function () {
		//
		$(document).ready(function(){
			$("#dlsn").hide();
		});
        //初始化表单验证
        $("#form1").initValidform();
        //物流编码赋值
        $("#ddlcategory_id").change(function () {
            var data = $(this).find("option:selected").attr("value");
            if (data != "") {

                if (data == "0") {
					$("#dlsn").hide();
                    $("#dlv2").show();
                    $("#jiage").html("代金券价格:");
                    $("#txtcontent").val("");
                    $("#txtcontent").prop("disabled", true);
                }
                else if (data == "1") {
					$("#dlsn").hide();
                    $("#dlv2").show();
                    $("#jiage").html("折扣卡:");
                    $("#txtcontent").val("");
                    $("#txtcontent").prop("disabled", false);
                }
                //--Change 20141111
                else if (data == "2") {
					$("#dlsn").hide();
                    $("#dlv2").show();
                    $("#jiage").html("使用次数:");
                    $("#txtcontent").val("");
                    $("#txtcontent").prop("disabled", false);
                }
                else if (data == "3") {
					$("#dlsn").hide();
                    $("#dlv2").show();
                    $("#jiage").html("减免:");
                    $("#txtcontent").val("");
                    $("#txtcontent").prop("disabled", false);
                }
                else if (data == "4") {
					$("#dlsn").show();
                    $("#dlv2").show();
                    $("#jiage").html("企业码折扣:");
					$("#txtcontent").val("公司优惠");
                    $("#txtcontent").prop("disabled", true);
                }

                $("#txtjiage").focus();
            }
        });
    });
    $("#texStartDateTime").datepicker({
        "minDate":new Date(),
        onClose: function (selectedDate) {
            $("#texEndDateTime").datepicker("option", "minDate", selectedDate);
        }
    });
    $("#texEndDateTime").datepicker({
        "minDate": new Date()
       
    });
</script>
</head>
<body class="mainbody">
<form id="form1" runat="server">
<!--导航栏-->
<div class="location">
  <a href="Exchange_list.aspx" class="back"><i></i><span>返回列表页</span></a>
  <a href="../center.aspx" class="home"><i></i><span>首页</span></a>
  <i class="arrow"></i>
  <a href="Exchange_list.aspx"><span>礼物卡生成</span></a>
  <i class="arrow"></i>
  <span>礼物卡生成</span>
</div>
<div class="line10"></div>
<!--/导航栏-->
    <div class="content-tab-wrap">
  <div id="floatHead" class="content-tab">
    <div class="content-tab-ul-wrap">
      <ul>
        <li><a href="javascript:;" onclick="tabs(this);" class="selected">编辑礼物卡分类信息</a></li>
      </ul>
    </div>
  </div>
</div>
<div class="tab-content">
  <dl>
    <dt>礼品卡类型:</dt>
    <dd >
    <div class="rule-single-select">
    <select id="ddlcategory_id" name="category_id" runat="server" datatype="*" sucmsg=" ">
           
            <option value="0">代金券</option>
             <option value="1">折扣卡</option>
             <option value="2">疗程卡</option>
             <option value="3">减免卡</option>
             <option value="4">企业折扣码</option> 
        </select>
        <span class="Validform_checktip">*</span>
        </div>
</dd>
  </dl>
     <dl id="dlsn" runat="server" >
    <dt id="sn" class="hidden">自定义编码:</dt>
    <dd>
      <asp:TextBox ID="txt_sn" runat="server" CssClass="input normal" errormsg="请输入正确的编码" sucmsg="" datatype="/(^[a-z0-9]+$|)/" ></asp:TextBox>
      <span class="Validform_checktip">*</span>
    </dd>
  </dl>
  <dl id="dlv2" runat="server" >
    <dt id="jiage">代金券价格:</dt>
    <dd>
      <asp:TextBox ID="txtprice" runat="server" CssClass="input small" errormsg="请输入正确的价格或折扣" sucmsg="" datatype="/^(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$/" ></asp:TextBox>
      <span class="Validform_checktip">*</span>
    </dd>
  </dl>
  <dl>
    <dt>输入生成卡数量:</dt>
    <dd>
      <asp:TextBox ID="txtnumber" runat="server" CssClass="input small"  sucmsg=" ">0</asp:TextBox>
      <span class="Validform_checktip">*</span>
    </dd>
  </dl>
  <dl>
    <dt>礼品卡使用期限:</dt>
    <dd>

     <asp:TextBox ID="texStartDateTime" runat="server"  CssClass="input date" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/" errormsg="请选择正确的日期" sucmsg=" "></asp:TextBox>   到   <asp:TextBox ID="texEndDateTime" runat="server"  CssClass="input date" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" datatype="/^\s*$|^\d{4}\-\d{1,2}\-\d{1,2}\s{1}(\d{1,2}:){2}\d{1,2}$/" errormsg="请选择正确的日期" sucmsg=" "></asp:TextBox>
      
      <span class="Validform_checktip">*</span>
    </dd>
  </dl>

  <dl>
    <dt>类别</dt>
    <dd>
      <asp:TextBox ID="txtcontent" runat="server" CssClass="input normal"  />
      <span ID="txtcontent_exp" class="Validform_checktip">1天，3天，减免，3个月疗程卡，6个月疗程卡</span>
    </dd>
  </dl>
  <dl>
    <dt>批次--说明</dt>
    <dd>
      <asp:TextBox ID="field1" runat="server" CssClass="input normal"  />
      <span class="Validform_checktip">唯一的ID</span>
    </dd>
  </dl>
</div>
<!--/内容-->
<!--工具栏-->
<div class="page-footer">
  <div class="btn-list">
    <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btn" onclick="btnSubmit_Click" />
    <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
  </div>
  <div class="clear"></div>
</div>
<!--/工具栏-->
    </form>
</body>
</html>
